##  Copyright (C) 2009 by Johann Duscher (alias Jonny Dee)
##
##  This file is part of PyoRhythm.
##
##  PyoRhythm is free software: you can redistribute it and/or modify
##  it under the terms of the GNU General Public License as published by
##  the Free Software Foundation, either version 3 of the License, or
##  (at your option) any later version.
##
##  PyoRhythm is distributed in the hope that it will be useful,
##  but WITHOUT ANY WARRANTY; without even the implied warranty of
##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
##  GNU General Public License for more details.
##
##  You should have received a copy of the GNU General Public License
##  along with PyoRhythm.  If not, see <http://www.gnu.org/licenses/>.

import sys

from PyQt4 import QtGui, QtCore

from pyorhythm.model import Person, BioRhythm
from pyorhythm.gui import QBioRhythmWindow

app = QtGui.QApplication(sys.argv)

startDate = QtCore.QDate(2009, 10, 28)
endDate = startDate.addDays(63)

person = Person("Jonny Dee")

appWindow = QBioRhythmWindow()
appWindow.addPerson(person)
appWindow.setStartDate(startDate)
appWindow.setEndDate(endDate)
appWindow.setBirthTime(QtCore.QDateTime(1976, 10, 3, 4, 53))
appWindow.setShowCycle(BioRhythm.AverageCycle, True)
appWindow.setShowCycle(BioRhythm.EmotionalCycle, True)
appWindow.setShowCycle(BioRhythm.IntellectualCycle, True)
appWindow.setShowCycle(BioRhythm.IntuitiveCycle, True)
appWindow.setShowCycle(BioRhythm.PhysicalCycle, True)
appWindow.setResolution(0.85)

appWindow.show()

sys.exit(app.exec_())
